package com.commerce.pojo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("user")
public class User {
    @TableId(value = "id", type = IdType.AUTO) //指定id类型为自增长
    /**
     * 用户id
     */
    private long id;
    /**
     * 用户密码
     */
    private String password;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 用户身份
     */
    private long role;
    /**
     * 用户姓名
     */
    private String username;

    public User() {
    }

    public User(long id, String password, String phone, long role, String username) {
        this.id = id;
        this.password = password;
        this.phone = phone;
        this.role = role;
        this.username = username;
    }

    public User(String password, String phone, long role, String username) {
        this.password = password;
        this.phone = phone;
        this.role = role;
        this.username = username;
    }
}
